/**
 * Created by zxh on 14-7-11.
 */

ms.UILayer = cc.Layer.extend({
    _ccsFileName: null,

    initLayer: function() {

        if (this._ccsFileName) {
            ms.UIHelper.loadWidgetFile("res/ccs/" + this._ccsFileName, this);
        }
        return true;
    }
});

ms.createLayer = function(uiClass) {
    var ret = new uiClass();

    if (ret && ret.initLayer()) {
        return ret;
    }

};

ms.createScene = function(uiClass) {
    var layer = ms.createLayer(uiClass);
    if (layer) {
        var scene = cc.Scene.create();
        scene.addChild(layer);
        return scene;
    }
}